<html>
<head><meta charset="utf-8"><title>unification in chalk · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html">unification in chalk</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="135846430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846430">(Oct 15 2018 at 17:41)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> so, I was looking more at some of the chalk methods -- if we are moving away from predicate -- we may need our own "unification code" for chalk</p>



<a name="135846438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846438">(Oct 15 2018 at 17:41)</a>:</h4>
<p>which is actually not that hard to do</p>



<a name="135846441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846441">(Oct 15 2018 at 17:41)</a>:</h4>
<p>but it would probably be the third instance of the same basic logic</p>



<a name="135846444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846444">(Oct 15 2018 at 17:41)</a>:</h4>
<p>which I am not super thrilled about</p>



<a name="135846487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846487">(Oct 15 2018 at 17:42)</a>:</h4>
<p>right now, there is the "main type relating" code, and then NLL has its own copy</p>



<a name="135846502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846502">(Oct 15 2018 at 17:42)</a>:</h4>
<p>the main one yields up <code>PredicateObligation&lt;'tcx&gt;</code> results</p>



<a name="135846513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846513">(Oct 15 2018 at 17:42)</a>:</h4>
<p>but we would rather want <code>Goal</code> values</p>



<a name="135846536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846536">(Oct 15 2018 at 17:43)</a>:</h4>
<p>otoh that may be inevtable because the chalk unifier would be the one in charge of handling the lazy norm logic I guess</p>



<a name="135846640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846640">(Oct 15 2018 at 17:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ok so I guess I can just take the existing unifier code and rewrite it so as it uses goals?</p>



<a name="135846666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846666">(Oct 15 2018 at 17:45)</a>:</h4>
<p>I am pondering</p>



<a name="135846675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846675">(Oct 15 2018 at 17:45)</a>:</h4>
<p>I'd probably model it on the NLL code</p>



<a name="135846676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846676">(Oct 15 2018 at 17:45)</a>:</h4>
<p>however:</p>



<a name="135846696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846696">(Oct 15 2018 at 17:45)</a>:</h4>
<p>we have at times been wondering if it makes sense to even use an infcx at all</p>



<a name="135846746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846746">(Oct 15 2018 at 17:46)</a>:</h4>
<p>ah well I don't want to revisit that decision yet</p>



<a name="135846769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846769">(Oct 15 2018 at 17:47)</a>:</h4>
<p>let's discuss at the planning meeting; but in short I think that — much as it pains me — it probably makes sense to have Yet Another Unifier, yeah. We really need to see what we can do about reducing that though</p>



<a name="135846790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135846790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135846790">(Oct 15 2018 at 17:47)</a>:</h4>
<p>I want to try and get a bit further through this list of <code>unimplemented!</code> helpers</p>



<a name="135850754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135850754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135850754">(Oct 15 2018 at 18:57)</a>:</h4>
<p>Unify the unifiers!</p>



<a name="135850760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135850760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135850760">(Oct 15 2018 at 18:57)</a>:</h4>
<p>"who will unify the unifiers...?"</p>



<a name="135850805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/135850805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#135850805">(Oct 15 2018 at 18:58)</a>:</h4>
<p>I am totally going to go create a rustc issue with that title</p>



<a name="136938309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938309">(Nov 01 2018 at 17:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> where is the NLL unifier defined?</p>



<a name="136938335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938335">(Nov 01 2018 at 17:55)</a>:</h4>
<p>say more :)</p>



<a name="136938345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938345">(Nov 01 2018 at 17:55)</a>:</h4>
<p>there isn't really a "NLL unifier" per se</p>



<a name="136938373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938373">(Nov 01 2018 at 17:55)</a>:</h4>
<p>well I guess maybe you mean this <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs</a></p>



<a name="136938375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938375">(Nov 01 2018 at 17:55)</a>:</h4>
<p>ah, yeah my question is maybe a bit vague, you told me that the simplest thing for chalk would be to have yet another copy of the unification code</p>



<a name="136938405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938405">(Nov 01 2018 at 17:56)</a>:</h4>
<p>oh</p>



<a name="136938443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938443">(Nov 01 2018 at 17:56)</a>:</h4>
<p>so you were looking for reference?</p>



<a name="136938446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938446">(Nov 01 2018 at 17:57)</a>:</h4>
<p>yes that's right :)</p>



<a name="136938563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938563">(Nov 01 2018 at 17:58)</a>:</h4>
<p>I'm trying to remember why I said that :)</p>



<a name="136938574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938574">(Nov 01 2018 at 17:58)</a>:</h4>
<p>oh, I guess in part because of lazy norm</p>



<a name="136938595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938595">(Nov 01 2018 at 17:59)</a>:</h4>
<p>(sound right?)</p>



<a name="136938607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938607">(Nov 01 2018 at 17:59)</a>:</h4>
<p>yes, and that we wanted to use <code>Goal</code> etc instead of <code>ty::PredicateObligation</code></p>



<a name="136938787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938787">(Nov 01 2018 at 18:01)</a>:</h4>
<p>ok, well, then probably the code I referred you to just now is what I was thinking of</p>



<a name="136938793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938793">(Nov 01 2018 at 18:01)</a>:</h4>
<p>I guess those are still good reasons</p>



<a name="136938915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/136938915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#136938915">(Nov 01 2018 at 18:03)</a>:</h4>
<p>ok cool</p>



<a name="137117286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/137117286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#137117286">(Nov 03 2018 at 15:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> are you around by any chance?</p>



<a name="146823983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/146823983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#146823983">(Nov 05 2018 at 21:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> fyi <a href="https://github.com/rust-lang-nursery/chalk/issues/189" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/189">https://github.com/rust-lang-nursery/chalk/issues/189</a> is blocking the implementation of <code>ChalkContext::instantiate_ex_clause</code></p>



<a name="146824042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/146824042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#146824042">(Nov 05 2018 at 21:08)</a>:</h4>
<p>also, I was thinking that if we generalized the NLL relating code so that it handles inference variables in both sides of the relation, it would be easy for me to adapt it for chalk</p>



<a name="146824075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/146824075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#146824075">(Nov 05 2018 at 21:09)</a>:</h4>
<p>I just extended a bit the <code>TypeRelatingDelegate</code> delegate and added a <code>NormalizationStrategy</code> enum (with <code>Lazy</code>/<code>Eager</code> variants)</p>



<a name="146839368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/146839368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#146839368">(Nov 06 2018 at 02:02)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> okay sure. could you recommend someone to take a look at my PR in the meanwhile maybe?</p>



<a name="146929098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/146929098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#146929098">(Nov 07 2018 at 09:36)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> what is current status here?</p>



<a name="146930790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/146930790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#146930790">(Nov 07 2018 at 10:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I have placeholder types etc, as I said I think I’m going to extend the NLL relating code so that it handles inference variables in both sides and I can use it for chalk</p>



<a name="146930872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/146930872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#146930872">(Nov 07 2018 at 10:19)</a>:</h4>
<p>Because apart from that, I found it easy to just inject lazy normalization into it</p>



<a name="147260202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147260202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147260202">(Nov 07 2018 at 22:08)</a>:</h4>
<p>ok <span class="user-mention" data-user-id="116009">@nikomatsakis</span>, I think the main work on unification was done in this commit: <a href="https://github.com/rust-lang/rust/commit/7f4ca7ff35b34a4923bb92a4e9f251c8aa1cc935" target="_blank" title="https://github.com/rust-lang/rust/commit/7f4ca7ff35b34a4923bb92a4e9f251c8aa1cc935">https://github.com/rust-lang/rust/commit/7f4ca7ff35b34a4923bb92a4e9f251c8aa1cc935</a></p>



<a name="147260226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147260226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147260226">(Nov 07 2018 at 22:08)</a>:</h4>
<p>however there are a few little unknowns for which I might need your help</p>



<a name="147260252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147260252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147260252">(Nov 07 2018 at 22:09)</a>:</h4>
<p>tell me when you have a bit of time to discuss (this can be done through text messages)</p>



<a name="147309251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147309251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147309251">(Nov 08 2018 at 16:03)</a>:</h4>
<p>hmm</p>



<a name="147309262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147309262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147309262">(Nov 08 2018 at 16:03)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> perhaps I can carve out some time tomorrow morning?</p>



<a name="147309477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147309477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147309477">(Nov 08 2018 at 16:06)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> seems fine</p>



<a name="147544500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147544500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147544500">(Nov 12 2018 at 18:58)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> so obviously that failed</p>



<a name="147544501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147544501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147544501">(Nov 12 2018 at 18:58)</a>:</h4>
<p>:)</p>



<a name="147544517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147544517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147544517">(Nov 12 2018 at 18:59)</a>:</h4>
<p>want to chat tomorrow morning though? perhaps at 10am my time (4pm your time)?</p>



<a name="147544538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147544538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147544538">(Nov 12 2018 at 18:59)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yeah that's cool</p>



<a name="147599038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147599038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147599038">(Nov 13 2018 at 15:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://github.com/rust-lang/rust/compare/master...scalexm:unification" target="_blank" title="https://github.com/rust-lang/rust/compare/master...scalexm:unification">https://github.com/rust-lang/rust/compare/master...scalexm:unification</a></p>



<a name="147599236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147599236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147599236">(Nov 13 2018 at 15:43)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">struct</span> <span class="nc">Foo</span><span class="o">&lt;</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="o">&gt;</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">A</span>: <span class="nb">Iterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">B</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">a</span>: <span class="nc">A</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="147599400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147599400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147599400">(Nov 13 2018 at 15:45)</a>:</h4>
<p><code>Foo&lt;A1, ?B1&gt; &lt;: Foo&lt;A2, ?B2&gt;</code></p>



<a name="147600357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147600357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147600357">(Nov 13 2018 at 15:59)</a>:</h4>
<div class="codehilite"><pre><span></span>for&lt;&#39;a, &#39;b&gt; fn(&amp;&#39;a u32, &amp;&#39;b u32) == for&lt;&#39;a&gt; fn(&amp;&#39;a u32, &amp;&#39;a u32)
</pre></div>



<a name="147600664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147600664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147600664">(Nov 13 2018 at 16:03)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/commit/a8c21cd2d3c4ac119a4b107aa4e0cdaf6d2e40f8#diff-32301bf61aae94fb34652b6c581a507fL255" target="_blank" title="https://github.com/rust-lang/rust/commit/a8c21cd2d3c4ac119a4b107aa4e0cdaf6d2e40f8#diff-32301bf61aae94fb34652b6c581a507fL255">https://github.com/rust-lang/rust/commit/a8c21cd2d3c4ac119a4b107aa4e0cdaf6d2e40f8#diff-32301bf61aae94fb34652b6c581a507fL255</a></p>



<a name="147603304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147603304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147603304">(Nov 13 2018 at 16:43)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> any time to look at my questions / WIP PR today maybe?</p>



<a name="147603335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147603335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147603335">(Nov 13 2018 at 16:43)</a>:</h4>
<p>on my list for today, yes</p>



<a name="147604036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147604036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147604036">(Nov 13 2018 at 16:53)</a>:</h4>
<p><span class="emoji emoji-1f389" title="tada">:tada:</span></p>



<a name="147604047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147604047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147604047">(Nov 13 2018 at 16:53)</a>:</h4>
<p>thanks</p>



<a name="147764893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147764893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147764893">(Nov 15 2018 at 19:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> so I have all the chalk callbacks implemented in my <code>unification</code> branch (modulo the ones that <span class="user-mention" data-user-id="117350">@Sunjay Varma</span> and <span class="user-mention" data-user-id="120512">@uberjay</span> are working on)</p>



<a name="147764919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147764919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147764919">(Nov 15 2018 at 19:07)</a>:</h4>
<p>there are probably a lot of bugs, so I guess a way to test everything is to proceed on switching the trait solver to use chalk</p>



<a name="147764978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147764978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147764978">(Nov 15 2018 at 19:08)</a>:</h4>
<p>any guidance for that? I'm not sure I know where to start</p>



<a name="147765153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147765153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147765153">(Nov 15 2018 at 19:11)</a>:</h4>
<p>ok I guess first step is to implement the <code>TraitEngine</code> trait that <span class="user-mention" data-user-id="116773">@csmoe</span> added</p>



<a name="147765685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/147765685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#147765685">(Nov 15 2018 at 19:18)</a>:</h4>
<p>yep that's right <span class="user-mention" data-user-id="131694">@scalexm</span></p>



<a name="148719580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/148719580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#148719580">(Nov 28 2018 at 15:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> could you find some time to review <a href="https://github.com/rust-lang/rust/pull/56214" target="_blank" title="https://github.com/rust-lang/rust/pull/56214">https://github.com/rust-lang/rust/pull/56214</a>?</p>



<a name="148719629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/148719629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#148719629">(Nov 28 2018 at 15:36)</a>:</h4>
<p>I think I have fixed most bugs since my <code>chalk</code> branch seems to work pretty well now</p>



<a name="148719672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/unification%20in%20chalk/near/148719672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/unification.20in.20chalk.html#148719672">(Nov 28 2018 at 15:36)</a>:</h4>
<p>yep; still feeling a bit sick today but I expect to at least do some reviewing in between naps :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>